/*
 * InterviewAlgorithm.h
 *
 *  Created on: 2013-1-14
 *      Author: EthanHuang
 */

#ifndef INTERVIEWALGORITHM_H_
#define INTERVIEWALGORITHM_H_

class InterviewAlgorithm
{
public:
	static void printMatrixInCycles(int **arr, int rows, int cols);

	static void mergeSortDriver(int *a, int size);
	static void mergeSort(int *a, int *temp, int left, int right);

private:
	static void _printMatrixCylcleLine(int **arr, int rows, int cols, int start);
	static void mergeSortMerge(int *a, int* temp, int leftPos, int rightPos, int rightEnd);

};

#endif /* INTERVIEWALGORITHM_H_ */
